﻿<%@ Page Title="" Language="C#" MasterPageFile="~/HomePage.Master" AutoEventWireup="true" CodeBehind="GioHang.aspx.cs" Inherits="ABCComputer.WebForm2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <div class="title_content">Giỏ Hàng</div>
	<div class="border_content">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
    <div class="clear" style="color: #CC3300">
        <div id="progress">
            <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
                <ProgressTemplate>
                    <img src="Home/images/progress.gif" width="24px" height="24px"/>
                </ProgressTemplate>
            </asp:UpdateProgress>
        </div>
        <h3 style="width:520px; float:right">Thông tin giỏ hàng của bạn</h3>
        </div>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">

        <ContentTemplate>
            <asp:GridView ID="GVGioHang" runat="server" BackColor="White" 
              BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
              EnableModelValidation="True" ShowFooter="True" 
            AutoGenerateColumns="False" Width="100%" >
              <Columns>
                  <asp:TemplateField HeaderText="Xóa">
                      <ItemTemplate>
                          <a href="GioHang.aspx?action=xoa&masp=<%#Eval("masanpham") %>"><img ID="imgxoa" src="Home/images/delete_icon.gif" alt="Xóa"/></img></a>
                      </ItemTemplate>
                  </asp:TemplateField>
                  <asp:TemplateField HeaderText="Mã Sản Phẩm">
                      <ItemTemplate>
                          <asp:Label ID="lblmasanpham" runat="server" Text='<%# Bind("masanpham") %>'></asp:Label>
                      </ItemTemplate>
                  </asp:TemplateField>
                  <asp:TemplateField HeaderText="Tên Sản Phẩm">
                      <ItemTemplate>
                          <asp:Label ID="lbltensanpham" runat="server" Text='<%# Bind("tensanpham") %>'></asp:Label>
                      </ItemTemplate>
                  </asp:TemplateField>
                  <asp:TemplateField HeaderText="Số Lượng">
                      <FooterTemplate>
                          
                      </FooterTemplate>
                      <ItemTemplate>
                          <asp:TextBox ID="txtsoluong" runat="server" Height="18px" 
                              Text='<%# Bind("soluong") %>' Width="47px"></asp:TextBox>
                      </ItemTemplate>
                  </asp:TemplateField>
                  <asp:TemplateField HeaderText="Đơn Giá">
                      <FooterTemplate>
                          <asp:Label ID="Label1" runat="server" Font-Bold="True" Text="Tổng Tiền: "></asp:Label>
                          &nbsp;
                      </FooterTemplate>
                      <ItemTemplate>
                          <asp:Label ID="lbldongia" runat="server" Text='<%# Bind("giaban", "{0:0,0 vnđ}") %>'></asp:Label>
                      </ItemTemplate>
                  </asp:TemplateField>
                  <asp:TemplateField HeaderText="Thành Tiền">
                      <FooterTemplate>
                          <asp:Label ID="lbltongtien" runat="server" Font-Bold="True" Font-Size="Small" 
                              ForeColor="#CC3300" Text = ''></asp:Label>
                      </FooterTemplate>
                      <ItemTemplate>
                          <asp:Label ID="lblthanhtien" runat="server" Text='<%# Bind("thanhtien", "{0:0,0 vnđ}") %>'></asp:Label>
                      </ItemTemplate>
                  </asp:TemplateField>
              </Columns>
                <EmptyDataTemplate>
                    <h4>Không có sản phẩm nào trong giỏ hàng&nbsp;
                        <asp:HyperLink ID="hplquayvetrangchu" runat="server" ForeColor="#3399FF" 
                            NavigateUrl="~/Defaullt.aspx">quay về trang chủ</asp:HyperLink>
                    </h4>
                </EmptyDataTemplate>
              <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
              <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
              <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
              <RowStyle BackColor="White" ForeColor="#330099" />
              <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
          </asp:GridView>

          <div class="clear">        
      </div>
    
	    <table width="100%" border="0">

	      <tr>

	        <td style="width: 262px">
                <asp:Button ID="btnTiepTucMuaHang" runat="server" Text="Tiếp tục mua hàng" />
              </td>

	        <td style="width: 230px">
                <asp:Button ID="btnCapNhat" runat="server"  
                     Text="Cập Nhật" onclick="btnCapNhat_Click" />
                    
              </td>

	        <td style="width: 218px">
                <asp:Button ID="btnXoaGioHang" runat="server" Text="Xóa giỏ hàng" />
              </td>

	        <td>
                <asp:Button ID="btnMuaHang" runat="server" Text="Mua Hàng" />
              </td>

	        </tr>

	      </table>
        </ContentTemplate>

        </asp:UpdatePanel>
      
	    <p>&nbsp;</p>

      </div>

</asp:Content>
